package com.atxiao.demo.mapper;

import com.atxiao.demo.bean.Account;
import com.atxiao.demo.bean.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface TransferMapper {

    User select(@Param("account") String account);  //根据卡号查询用户



    int addMoney(@Param("account")String account,@Param("balance")Double balance);  //设置转账后的余额

    int insertIncome(@Param("account")String account, @Param("addMoney")double addMoney, @Param("time")String time, @Param("status")int status,
                     @Param("balance")double balance, @Param("type")int type, @Param("place")String place, @Param("transfer_result")int transfer_result,
                     @Param("putAccount")String putAccount);


    int reduceMoney(@Param("reduceAccount")String reduceAccount, @Param("reduceBalance")double reduceBalance);

    int reduceIncome(@Param("account")String account, @Param("addMoney")double addMoney, @Param("time")String time, @Param("status")int status,
                     @Param("reduceBalance")double reduceBalance, @Param("type")int type, @Param("place")String place, @Param("transfer_result")int transfer_result,
                     @Param("putAccount")String putAccount);

    //查询余额
    double selectRem(@Param("reduceAccount")String reduceAccount);



}
